package com.pipe.config;

import com.pipe.factory.OssFactory;
import com.pipe.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName OssConfig
 * @Author HETAO
 * @Date 2020/7/10 14:47
 */
@Configuration
public class OssConfig {

    @Autowired
    private OSSProperties prop;

    /**
     *
     * @return
     */
    @Bean
    public OssService ossService() {
        return OssFactory.createOss(prop.getOssSelect(),prop);
    }
}
